/**
 * 
 */
package edu.wpi.cs509.messages.server;

import edu.wpi.cs509.messages.MsgBc;
import edu.wpi.cs509.messages.client.MsgJoinGameReply;

/**
 * This class implements the message to create a game.
 * @author sparadis
 *
 */
public class MsgCreateGame extends MsgServerContext {

	/**
	 * serializable version number
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Constructor.
	 */
	public MsgCreateGame() {
	}

	/**
	 * Create a new game.
	 * @return MsgBc - a reply message with the new game
	 */
	public MsgBc doExecuteAndGetReply() {
		//Create a new game, send it to the client.
		return (new MsgJoinGameReply(
				getServer().startNewGame(getConnection())));
	}
}
